/**
 * Created by aresn on 16/7/18.
 */
let dict = {
    teacherRoles: [
        {
            dictKey: "1",
            dictVal: '教师组长'
        },
        {
            dictKey: "2",
            dictVal: '普通教师'
        }
    ]
};

dict.getVal = function (name, key) {
    var arr = dict[name];
    for(var i in arr) {
        var item = arr[i];
        if(item.dictKey == key) {
            return item.dictVal;
        }
    }
    return "";
};

export default dict;